import React, { Component } from 'react';
import {observer} from "mobx-react";
import  Mobx from  '../mobx'
@observer class InformationSon extends Component {
    constructor(props) {
        super(props)
    }
    toDetail(item){
        Mobx.history.push('/InformationDetail/'+item.id)
    }
    render() {
        return (
            <div className='Information'>
                {
                    this.props.Zixun.map((item,index)=>{
                        return(
                            <div className='InformationOne' key={index} onClick={this.toDetail.bind(this,item)}>
                                <div className='left'>
                                    <img src={item.mPic} alt=""/>
                                </div>
                                <div className='right'>
                                    <p className='title shengluehao'>{item.title}</p>
                                    <p className='content'>
                                        {item.text.trim()}
                                    </p>
                                    <span><img src={require('../img/eye.png')} alt=""/>{item.hits}</span>
                                </div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default InformationSon;
